import React from "react";
import { Menu, Dropdown, Avatar, Space } from "antd";
import { DownOutlined } from "@ant-design/icons";

const menu = (
	<Menu>
		<Menu.Item key="info">
			<a href="/home">个人信息</a>
		</Menu.Item>
		<Menu.Item key="logout">
			<a href="/register">退出登陆</a>
		</Menu.Item>
	</Menu>
);

export default () => {
	return (
		<Space>
			<Avatar style={{ color: "#f56a00", backgroundColor: "#fde3cf" }}>
				A
			</Avatar>

			<Dropdown overlay={menu}>
				<a className="ant-dropdown-link" onClick={(e) => e.preventDefault()}>
					菜单 <DownOutlined />
				</a>
			</Dropdown>
		</Space>
	);
};
